/**
 * Copyright (c) 2002-2012 旭鸣信息
 * All rights reserved. 
 * File：FrontUserMessageService.java
 * History: Mar 20, 2013: Initially created, liuzhi.
 */
package com.xteam.ecsystem.service.front;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xteam.ecsystem.dao.IFrontUserMessageDao;
import com.xteam.ecsystem.entities.BaseUserMessage;
import com.xteam.ecsystem.utils.PageCenterStation;

/**
 * 前端用户留言服务层
 * @author liuzhi
 *
 */
@Service
public class FrontUserMessageService {

	@Autowired
	private IFrontUserMessageDao userMsgDao;
	
	/**
	 * 获取会员留言（及回复）列表
	 * @author liuzhi Mar 20, 2013
	 * @param userEmail
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	public PageCenterStation<?> getUserMessages(String userEmail, int pageIndex, int pageSize){
		return this.userMsgDao.getUserMessages(userEmail, pageIndex, pageSize);
	}
	
	/**
	 * 删除用户留言
	 * @author liuzhi Mar 21, 2013
	 * @param bucId
	 */
	public void delUserMessage(String bumId){
		this.userMsgDao.delUserMessage(bumId);
	}
	
	/**
	 * 级联删除管理员针对用户的留言
	 * @author liuzhi Mar 21, 2013
	 * @param bucId
	 */
	public void delUserReMessage(String bumId){
		this.userMsgDao.delUserReMessage(bumId);
	}
	
	/**
	 * 保存用户留言信息
	 * @author liuzhi Mar 22, 2013
	 * @param userMsg
	 */
	public void saveUserMsg(BaseUserMessage userMsg){
		this.userMsgDao.saveUserMsg(userMsg);
	}
}
